<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
 <div id="div">

 </div>
  <script>
    var div = document.getElementById("div")
    console.log(new Date());
    console.log(new Date().getMonth()+1);
    console.log(new Date().getHours( ));
    window.setInterval(function () {
      var scond = new Date().getSeconds();
      var mine = new Date().getMinutes();
      var hours = new Date().getHours();
      var day = new Date().getDate();
      var moth = new Date().getMonth()+1;
      var year = new Date().getFullYear();
      var date =year+"年"+moth+"月"+day+"日"+hours+":"+mine+":"+scond
      div.innerText = date
    },1000)
  </script>
</body>
</html>